﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace SwParaPlatform2
{
    public static class Defines
    {
        //尺寸缩放
        public const int Scale_Sketch = 1000;

        //文本定义
        public const string Key_True = "TRUE";
        public const string Key_False = "FALSE";

        //子字典键（主字典键是名字）
        public const string Key_Type = "Type";
        public const string Key_Lenth = "Lenth";
        public const string Key_Compress = "压缩";

        //子字典值：类型
        public const string Type_Dimension = "Dimension";
        public const string Key_UnCompress = "U"; //没压缩
        public const string Key_Compressed = "S"; //压缩了

        //特征压缩的类型
        public static List<string> DimList = new List<string> { 
            "Dimension", 
            "DimMates",
        };
        public static List<string> CompressList = new List<string> { "Cut", 
            "ICE", 
            "Extrusion", 
            "Shell", 
            "Fillet", 
            "SubComps", 
            "MainComps", 
            "FtrFolder",
            "Cut",
            "ExtruThin",
            "SMBaseFlange",
            "BaseBody",
            "LPattern",
            "LocalLPattern",
            "HoleWzd",
            "MirrorPattern",
            "MirrorCompFeat",
            "ProfileFeature",
            "Revolution",
            "Sweep",
            "CirPattern",
            "Rib",
            "Chamfer",
            "RefPlane",
            "ReferencePattern",
            "SolidBodyFolder",
            "SurfaceBodyFolder",
            "LocalCirPattern",
            "FlatPattern",
            "TemplateFlatPattern",
             "UnFold",
             "EdgeFlange",
             "RefAxis",
            "RefPoint",
        };
        public static List<string> MateList = new List<string> { 
            "Mates", 
            "DimMates",
        };
        public static List<string> ComponentList = new List<string> { 
            "SubComps", 
            "MainComps", 
        };
        public static List<string> EquationList = new List<string> { 
            "Equation", 
        };

        public static List<string> SpLineList = new List<string> {
            "SketchSpline",
        };

        public static Dictionary<string, List<string>> dRuleDict = new Dictionary<string, List<string>>
        {
            {"尺寸驱动",  DimList},
            {"特征压缩",  CompressList},
            {"配合驱动",  MateList},
            {"零部件",  ComponentList},
            {"方程式曲线",  SpLineList},
            //{"方程式常量",  EquationList},
        };

        public const string Type_Arg = "Arg"; //参数
        public const string Type_Element = "Element"; //元素
        public const string Type_Number = "Number"; //数字
        public const string Type_String = "String"; //字符串
        public const string Type_RepFilePath = "ReplaceFilePath"; //文件路径，保存公式时替换为项目内文件
        public const string Type_Bool = "Bool"; //true false
        public const string Type_IF = "IF"; //IF
        public const string Type_Split = "Split"; //分隔符
        public const string Type_Ope = "Operation"; //普通运算符
        public const string Type_SpLine = "SpLine"; //方程式曲线特殊处理


        public const string Comp_Split = "%->%"; //参数父级之間的分隔符
        public const string Mate_Split = "-%-"; //参数名的分隔符
        public const string Parent_Split = "-Parent-"; //参数名的分隔符

        public const string UseValue_Split = "%usevalue%"; //使用属性的分隔符

        public const string SpLine_Split = "|spline|"; //方程式曲线的分隔符
        public const string Quot_Split = "|,|"; //公式的分隔符
        public const string IF_Split = "IF"; //IF的分隔符
        public const string And_Split = "And";//And的分隔符
        public const string Or_Split = "or";//or的分隔符

        public const string Result_False = "allfalse"; //所有表达式都不成立

        public const string Note_NameElementName = "Note_Name";
        public const string Name_NoteElementName = "Name_Note";

        public static List<string> Type_List_Quot = new List<string> { Type_Arg, Type_Element };

    }
}
